package com.itheima.day20.demo07;

import java.util.function.Function;

public class DemoFunction {
    public static void main(String[] args) {
        String str = "范冰冰，30";
        System.out.println(getAgeNum(str, e -> e.split("，")[1], Integer::parseInt, e -> e += 100));
    }

    public static int getAgeNum(String str, Function<String, String> one, Function<String, Integer> two, Function<Integer, Integer> three) {
        return one.andThen(two).andThen(three).apply(str);
    }
}
